using System.IO;
using System.Windows.Forms;
using DrawTools.Editor;
using DrawTools.Editor.CanvasFigures;
using DrawTools.Properties;

namespace DrawTools.Tools
{
  /// <summary>
  ///   Ellipse tool
  /// </summary>
  public class EllipseTool : RectangleTool
  {
    public EllipseTool(EditorColorSettrings settings) : base(settings)
    {
      Cursor = new Cursor(new MemoryStream(Resources.Ellipse1));
    }

    public override void OnMouseDown(IDrawingCanvas canvas, MouseEventArgs e)
    {
      var ellipse = new CanvasEllipse(e.X, e.Y, 1, 1)
      {
        BorderColor = Settings.BorderColor
      };

      AddNewObject(canvas, ellipse);
    }
  }
}